// pages/my/components/model-card/index.js
const app = getApp()
Component({
  lifetimes:{
    attached(){
      this.setData({
        isPublishSuccess: this.properties.modelData.hallOfFameModel === 1 || this.properties.modelData.hallOfFameModel === 2
      })
    }
  },
  /**
   * 组件的属性列表
   */
  properties: {
    modelData: {
      type: Object
    },
    isCollectionModel: {
      type: Boolean,
      default: false,
    },
    isOther: {
      type: Boolean,
      default: false,
    },
  },
  /**
   * 组件的初始数据
   */
  data: {
    IMGBASEURL: app.globalData.IMGBASEURL,
    userDetail: wx.getStorageSync('userInfo'),
    isPublishSuccess: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    toDetail() {
      wx.navigateTo({
        url: `/pages/modelStore/modelDetail/index?id=${this.properties.modelData.id}`,
      })
    },
  }
})